package com.zhny.aiot.syb.flow.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class FlowStoreEntry extends StoreEntity {
    @PropertyValue(alias = "瞬时流量",description = "瞬时流量值",unit = "m3/h",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private String flow;
    @PropertyValue(alias = "瞬时流速",description = "瞬时流速值",unit = "m/s",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private String flowSpeed;
    @PropertyValue(alias = "累计流量",description = "累计流量值",unit = "m3",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private String totalFlow;

    @Override
    public String toString(){
        StringBuilder builder = new StringBuilder ();
        builder.append ("flow:");builder.append (flow);builder.append (";");
        builder.append ("flowSpeed:");builder.append (flowSpeed);builder.append (";");
        builder.append ("totalFlow:");builder.append (totalFlow);builder.append (";");

        return builder.toString ();
    }
}
